<template>
  <div class="home">
    <div class="mb-4">
      <el-button :disabled="true">Default</el-button>
      <el-button type="primary" :loading="true">Primary</el-button>
      <el-button type="success" size="large">Success</el-button>
      <el-button type="info" size="small">Info</el-button>
      <el-button type="warning" tag="div">Warning</el-button>
      <el-button type="danger">Danger</el-button>
    </div>

    <div>
      <el-button :icon="Search" circle color="#626aef"/>
      <el-button type="primary" :icon="Edit" circle />
      <el-button type="success" :icon="Check" circle />
      <el-button type="info" :icon="Message" circle />
      <el-button type="warning" :icon="Star" circle />
      <el-button type="danger" :icon="Delete" circle />
    </div>
    <!-- 使用icon图标组件 -->
    <div>
      <el-icon :size="size" :color="color">
        <Edit />
      </el-icon>
      <!-- 或者独立使用它，不从父级获取属性 -->
      <Edit style="width: 50px;height:50px;color:#626aef;"/>
    </div>
    <!-- 选取自己喜欢的图标，每个图标类型中选择两个，
    分别使用第一种和第二种方式展示 -->
    <div>
      <el-icon :size="size" :color="color">
        <Plus />
      </el-icon>
        <Minus style="width: 45px; height:45px;color:red;"/>
    </div>
    <div>
      <el-icon :size="size" :color="color">
        <ArrowLeft />
      </el-icon>
        <ArrowUp style="width: 45px; height:45px;color:red;"/>
    </div>
    <!-- layout布局 -->
    <el-row>
      <!-- 当前这一列有24分栏 -->
      <el-col :span="24">
        <div class="box1"></div>
      </el-col>
    </el-row>
    <br/>
    <el-row>
      <!-- 当前这一列有24分栏 -->
      <el-col :span="4">
        <div class="box1"></div>
      </el-col>
      <el-col :span="4" :offset="4">
        <div class="box2"></div>
      </el-col>
    </el-row>
    <br/>
    <!-- 让一行里面的列的间距30 -->
    <el-row :gutter="30">
      <!-- 当前这一列有24分栏(栅格) 24分栏满屏，宽100% -->
      <el-col :span="8">
        <div class="box1"></div>
      </el-col>
      <el-col :span="8">
        <div class="box2"></div>
      </el-col>
      <el-col :span="8">
        <div class="box3"></div>
      </el-col>
    </el-row>
    <br/>
    <!-- space-evenly:四个间距相等 space-around:子项分布均匀，,第一个和最后一个子项与容器边界也会有相同的间距-->
    <el-row justify='space-evenly'>
      <!-- 当前这一列有24分栏(栅格) 24分栏满屏，宽100% -->
      <el-col :span="6">
        <div class="box1"></div>
      </el-col>
      <el-col :span="6">
        <div class="box2"></div>
      </el-col>
      <el-col :span="6">
        <div class="box3"></div>
      </el-col>
    </el-row>
    <br/>
    <el-row :gutter="10">
      <!-- 屏幕发生改变列的比例也随之改变 xs sm... -->
      <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="1"
        ><div class="box1"
      /></el-col>
      <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"
        ><div class="box2"
      /></el-col>
      <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"
        ><div class="box3"
      /></el-col>
      <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="1"
        ><div class="box1"
      /></el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
import {
  Check,
  Delete,
  Edit,
  Message,
  Search,
  Star,
} from '@element-plus/icons-vue'

import {ref, reactive} from 'vue'

const size=ref('50px')
const color=ref('#626aef')
</script>

<style scoped>
.box1{
  height: 30px;
  background-color: red;
}
.box2{
  height: 30px;
  background-color: pink;
}
.box3{
  height: 30px;
  background-color:green;
}
.el-col {
  border-radius: 4px;
}

.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
</style>